package com.demo4;

public abstract class Car {
    private String brand;
    private String color;
    //构造函数的定义
    public Car() {
    }
    public Car(String brand, String color) {
        this.brand = brand;
        this.color = color;
    }
    //getter/setter
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    //定义抽象方法
    public abstract void run();
}
